-- GENERATED SPELL FOR [Grand Crusader Dathrohan] --


function spell0_10812(pUnit, Event) --@Crusader Strike,n/a--
pUnit:FullCastSpellOnTarget(17281,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10812', 30301, 1)
end

function spell1_10812(pUnit, Event) --@Crusader\'s Hammer,Self--
pUnit:FullCastSpellOnTarget(17286,pUnit)
pUnit:RegisterEvent('Sorts_10812', 4341, 1)
end

function spell2_10812(pUnit, Event) --@Domination,n/a--
pUnit:FullCastSpellOnTarget(17405,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10812', 16000, 1)
end

function spell3_10812(pUnit, Event) --@Holy Strike,n/a--
pUnit:FullCastSpellOnTarget(17284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10812', 582, 1)
end

function spell4_10812(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(17287,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10812', 1500, 1)
end

function spell5_10812(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(13704,pUnit)
pUnit:RegisterEvent('Sorts_10812', 6316, 1)
end

function spell6_10812(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17399,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10812', 568, 1)
end

function spell7_10812(pUnit, Event) --@Sleep,n/a--
pUnit:FullCastSpellOnTarget(12098,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10812', 21000, 1)
end

function Sorts_10812(pUnit, Event)
local choix_sorts_10812 = math.random(0, 7)
if choix_sorts_10812 == 0 then
pUnit:RegisterEvent('spell0_10812', 1, 1)
end
if choix_sorts_10812 == 1 then
pUnit:RegisterEvent('spell1_10812', 1, 1)
end
if choix_sorts_10812 == 2 then
pUnit:RegisterEvent('spell2_10812', 1, 1)
end
if choix_sorts_10812 == 3 then
pUnit:RegisterEvent('spell3_10812', 1, 1)
end
if choix_sorts_10812 == 4 then
pUnit:RegisterEvent('spell4_10812', 1, 1)
end
if choix_sorts_10812 == 5 then
pUnit:RegisterEvent('spell5_10812', 1, 1)
end
if choix_sorts_10812 == 6 then
pUnit:RegisterEvent('spell6_10812', 1, 1)
end
if choix_sorts_10812 == 7 then
pUnit:RegisterEvent('spell7_10812', 1, 1)
end
end

function mob10812_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10812', math.random(1500, 3000), 1)
end

function mob10812_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10812_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10812_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10812, 1, 'mob10812_Action')
RegisterUnitEvent(10812, 2, 'mob10812_Leave')
RegisterUnitEvent(10812, 3, 'mob10812_Kill')
RegisterUnitEvent(10812, 4, 'mob10812_Die')
